<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>SweetAlert</title>
		<script src="../../static/js/jquery-2.1.3.min.js"></script>
		<script src="../../layui/layui.js"></script>
		<link rel="stylesheet" href="../../layui/css/layui.css" />
		<script type="text/javascript">
			function alertMessage(content) {
				layui.use(['form', 'element'], function() {
					var element = layui.element;
					var layer = layui.layer;
					var form = layui.form;
					layer.open({
						type: 1,
						title: "报警信息",
						area: ['51%', '55%'],
						resize:false,
						content: $("#popSearchRoleTest").html(),
						success:function(){
							$("#alarmUnit").attr("value","A7");
							$("#alarmStartTime").attr("value","2019-04-30 15:56:59");
							$("#alarmCode").attr("value","Fd");
							$("#alarmMessage").attr("value","烘干加热丝故障");
							$("#originalCode").attr("value","FF FF 16 00 00 00 00 00 00 04 0F 5A 00 00 00 00 00 00 00 00 18 00 00 84");
						}
					});
					form.render();

				})
			}
		</script>
	</head>
	<body>
		<button class="btn layui-btn" onclick="alertMessage(1)">提交</button>
		<script type="text/html" id="popSearchRoleTest">
			<!-- 遮罩层开始 -->
			<div class="layui-row"  >
			   <div class="layui-col-md11">
			     <form class="layui-form" lay-filter="formTestFilter2121"  style="margin-top: 30px;margin-left: 50px;">
				 <!-- 首行 -->
				 <div class="layui-form-item">
				   <div >
				    <img src="../../img/baojing3.png" style="margin-left: 150px; height: 100px;" />
					<font style="color: red;margin-left: 20px;font-size: 30px;">台位<label>A7</label>发出报警</font>
				   </div>
				 </div>
				 <!--首行結束-->
			       <div class="layui-form-item">
			         <label class="layui-form-label">报警台位：</label>
			         <div class="layui-input-inline">
			           <input type="text" name="alarmUnit" id = "alarmUnit" class="layui-input" readonly="true"/>
			         </div>
			         <label class="layui-form-label" class="layui-se">报警时间：</label>
			         <div class="layui-input-inline">
			              <input type="text" name="alarmStartTime"  id="alarmStartTime" class="layui-input" readonly="true">
			         </div>
			       </div>
			        <div class="layui-form-item">
			         <label class="layui-form-label">报警代码：</label>
			         <div class="layui-input-inline">
			           <input type="text" name="alarmCode" id="alarmCode" class="layui-input" readonly="true">
			         </div>
			         <label class="layui-form-label">报警信息：</label>
			         <div class="layui-input-inline">
			         <input type="text" name="alarmMessage" id="alarmMessage" class="layui-input" readonly="true">
			         </div>
			       </div>
				    <div class="layui-form-item">
				     <label class="layui-form-label">原始代码：</label>
				     <div class="layui-input-inline" style="width:80%">
				       <input type="text" name="originalCode" id="originalCode" class="layui-input" style="width: 100%;" readonly="true">
				     </div>
				   </div>
				   <div class="layui-form-item">
				    <div class="layui-input-block">
			          <button class="layui-btn layui-bg-blue"  style="margin-left: 400px;">故障处理</button>
			         </div>
				   </div>
			     </form>
			   </div>
			 </div>
			<!-- 遮罩层结束 -->
			
		</script>
		<!-- 弹出报警框开始 -->
		<div id="alert">
			<!-- <div style="float:left; ">
				<div><font style="font-size: 25px;"><font style="font-weight: bold;">台位3</font>发出报警信息</font></div>
				<div style="padding-top: 10px;"><img src="img/baojing2.png"></img></div>
			</div>
			<div style="float: left; ">
					<div>台位3发出报警信息</div>
					<div><img src="img/baojing2.png"></img></div>
				</div>
			</div> -->
			<table>
				<tr>
					<td>台位发出报警</td>
					<td>
						<div style="background-color: red; width: 30px; height: 25px;">A-1</div>
					</td>
					<td>温度传感器异常</td>
				</tr>
			</table>
		</div>
		<!-- 弹出报警框结束 -->


	</body>
</html>
